package com.lyk.swap;

import java.io.Serializable;
import java.util.Date;

public class MonthRisk implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 403968543830358431L;
	private String monthLabel;
	private int day;
	private double risk;

	public MonthRisk() {
	}

	@SuppressWarnings("deprecation")
	public MonthRisk(Date begin, int index, int day, double risk) {
		int month = begin.getMonth() + index + 1;
		int year = begin.getYear() + month / 12;
		month %= 12;
		monthLabel = new PeriodLabel(year, month).toString();
		this.day = day;
		this.risk = risk;
	}

	public int getRisk() {
		return (int) risk;
	}

	public void setRisk(double risk) {
		this.risk = risk;
	}

	public int getDay() {
		return day;
	}

	public void setDay(int day) {
		this.day = day;
	}

	public String getMonthLabel() {
		return monthLabel;
	}

}
